package chapter02

object ForTest extends App {

  for (i <- 1 to 100)
    println(i)

  for (i <- 1 until 100)
    println(i)

  for (i <- 1 to 10; j <- 1 to 10)
    println(i + "  " + j)

  for (i <- 1 to 10; j <- 1 to 10 if (i == j))
    println(i + "  " + j)

  val v = for (i <- 1 to 10) yield i
  println(v)

}